package com.bear.fastrepair.mvvm.ui

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.bear.fastrepair.mvvm.data.MainRepository
import com.bear.fastrepair.mvvm.data.login.LoggedInType
import com.bear.fastrepair.utils.launch

class MainViewModel(private val repository: MainRepository) : ViewModel() {
    private val _loginStatus = MutableLiveData<LoggedInType>()
    val loginStatus: LiveData<LoggedInType> = _loginStatus
    var loginFlag = false

    fun loginStatus() = launch {
        _loginStatus.value = repository.loginStatus()
    }
}